<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;

class UploadController extends Controller
{
    public function index(){
        $disk = Storage::disk('qiniu');

        //$ded = $disk->put('avatars/1.png', '/var/www/boss.hofuzi.com/public/storage/2017/11/17/CbYRUPZeL6FhpsCQxKQnuDT5k0jAVp7XrA1Z9WCY.png');
        //var_dump($ded);

        $url = $disk->getUrl('avatars/1.png');

        $eurl = $disk->gtePrivateDownloadUrl($url,8000);
        var_dump($eurl);
    }
}
